%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/enum_tables.mutations2"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 14, 15<br /><br />1: PgInsertSingle[11]<br />2: <br />ᐳ: Object[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 16, 11<br /><br />ROOT Object{1}ᐸ{result}ᐳ[16]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 11<br /><br />ROOT PgInsertSingle{1}ᐸreferencing_table()ᐳ[11]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'a3'ᐳ[22]<br />- Constantᐸ'b4'ᐳ[23]"}}:::plan
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object14{{"Object[14∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access12 & Access13 --> Object14
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access12
    __Value2 --> Access13
    ApplyInput15{{"ApplyInput[15∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput15
    PgInsertSingle11[["PgInsertSingle[11∈1] ➊<br />ᐸreferencing_table()ᐳ"]]:::sideeffectplan
    Object14 & ApplyInput15 --> PgInsertSingle11
    Object16{{"Object[16∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle11 --> Object16
    PgClassExpression17{{"PgClassExpression[17∈3] ➊<br />ᐸ__referenc...ble__.”id”ᐳ"}}:::plan
    Access18{{"Access[18∈3] ➊<br />ᐸ11.tᐳ"}}:::plan
    Access18 --> PgClassExpression17
    PgInsertSingle11 --> Access18
    PgClassExpression19{{"PgClassExpression[19∈3] ➊<br />ᐸ__referenc..._.”enum_1”ᐳ"}}:::plan
    PgClassExpression17 o--o PgClassExpression19
    PgClassExpression20{{"PgClassExpression[20∈3] ➊<br />ᐸ__referenc..._.”enum_2”ᐳ"}}:::plan
    PgClassExpression19 o--o PgClassExpression20
    PgClassExpression21{{"PgClassExpression[21∈3] ➊<br />ᐸ__referenc..._.”enum_3”ᐳ"}}:::plan
    PgClassExpression20 o--o PgClassExpression21

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,Access12,Access13,Object14,ApplyInput15 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle11,Object16 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression17,Access18,PgClassExpression19,PgClassExpression20,PgClassExpression21 bucket3

